initialize database
Initialize database
Syntax
init_db_stmt:
INITIALIZE [DATABASE] database_name
Description
The INITIALIZE statement can be used to (re)initialize the database named database_name. Note that this statement will delete the entire contents of the specified database so be sure you know what you're doing before you execute this statement!
This statement is transactional so you will need to COMMIT the transaction in order to permanently initialize the database. Also, the database can be opened in shared mode so if other clients have the database open, once the initialize has been committed, they will no longer see data in the database.
When the database has been opened in shared mode, the system will attempt to place an exclusive lock on the database which could result in status eSQL_TIMEOUT (SQLSTATE "HYT00") being returned. The database lock will be freed when the transaction ends (either through a COMMIT or a ROLLBACK).
Example
open database bookshop exclusive; initialize bookshop; ...import bookshop tables commit;
See Also